import { cwd } from 'process'
import { resolve } from 'path'

const currentWorkPath: string = cwd()

// 需要用到的本地静态资源的路径
const staticPath: string = resolve(currentWorkPath, './static')
const userinfoPath: string = resolve(currentWorkPath, './static/userinfo.json')

// 根据 name 生成文件路径
const getStaticPagePath = (name: string): string => resolve(currentWorkPath, `./static/${name}.html`)

export { staticPath, userinfoPath, getStaticPagePath }
